<template>
  <div class="productCp">
    <img :src="product.image">
    <span class="name-line">{{product.name}}</span>
    <br>
    <span class="price-line">&yen;<span class="price-num-line">{{product.price}}</span></span>
    <button class="buy-btn">订 购</button>
    <div class="cancal-btn" v-if="isUserPage">
      <i></i>
    </div>
  </div>
</template>

<script>
import { } from 'vux'

export default {
  props: {
    product: {
      type: Object,
      default: {
        image: ''
      }
    },
    isUserPage: {
      type: Boolean,
      default: false
    }
  },
  components: {},
  data () {
    return {
    }
  },
  watch: {

  },
  methods: {

  }
}
</script>

<style lang="less">
.productCp {
  position: relative;
  width: 44vw;
  height: 55vw;
  margin: 15px auto 0 auto;
  border-radius: 10px;
  box-shadow: 0 5px 15px #ccc;
  color: @font-color;
  img {
    width: 100%;
    height: 60%;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
  }
  .name-line {
    padding: 5px 0 0 10px;
    font-size: 13px;
    line-height: 17px;
    display: inline-block;
  }
  .price-line {
    padding: 5px 0 0 10px;
    font-size: 12px;
    .price-num-line {
      font-size: 18px;
      color: @theme-color;
    }
  }
  .buy-btn {
    position: absolute;
    bottom: 15px;
    right: -7px;
    border: none;
    border-radius: 5px;
    background: @btn-color;
    color: #fff;
    height: 30px;
    width: 60px;
    box-shadow: 0 5px 10px @btn-shadow-color;
  }
  .cancal-btn {
    position: absolute;
    right: -8px;
    top: 15px;
    height: 30px;
    width: 30px;
    border-radius: 5px;
    background: @btn-color;
    box-shadow: 0 5px 15px @btn-shadow-color;
    i {
      display: block;
      width: 24px;
      height: 24px;
      background: url('../../assets/unlike.png') no-repeat;
      background-size: 25px;
      margin: 3px 0 0 3px;
    }
  }
}
</style>
